<!--
 * @Author: Neko
 * @Date: 2021-06-03 15:57:11
 * @LastEditTime: 2021-06-09 10:38:45
 * @LastEditors: Neko
-->
<template>
  <view class="brand-item__container" :class="{ active: active }" @click="onClickBrandItem">
    <u-image width="120" height="80" :src="src" mode="aspectFit" />
  </view>
</template>

<script>
export default {
  props: {
    src: {
      type: String,
      default: ''
    },

    active: {
      type: Boolean,
      default: false
    }
  },

  methods: {
    onClickBrandItem() {
      this.$emit('click')
    }
  }
}
</script>

<style lang="scss" scoped>
.brand-item__container {
  width: 176rpx;
  height: 88rpx;
  padding: 4rpx 28rpx;
  border: 2rpx solid #fff;
  border-radius: 8rpx;

  &.active {
    border-color: #0049AC;
  }
}
</style>